import java.util.Scanner;

public class xiaoming {
    public static void main(String[] args) {
        Scanner scl = new Scanner(System.in);
        int qb = 1;
        int xp = 2;
        int kl = 3;
        int ls = 5;
        int book = 12;
        int qian = 20;
        System.out.println("书本的价格为"+book+"元，您总共有"+qian+"元");
        System.out.println("1.铅笔价格为："+qb+"元");
        System.out.println("2.橡皮价格为："+xp+"元");
        System.out.println("3.可怜价格为："+kl+"元");
        System.out.println("4.零食价格为："+ls+"元");
        System.out.println("请输入其他需要购买商品的序列号");
        int id = scl.nextInt();
        switch (id){
            case 1:
                int qbq = qian-book;
                int qbs = qbq/qb;
                int qbye = qbq%qb;
                System.out.println("购买完书本后还可以购买铅笔"+qbs+"个，还剩"+qbye+"元");
                break;
            case 2:
                int xpq = qian-book;
                int xps = xpq/xp;
                int xpye = xpq%xp;
                System.out.println("购买完书本后还可以购买橡皮"+xps+"个，还剩"+xpye+"元");
                break;
            case 3:
                int klq = qian-book;
                int kls = klq/kl;
                int klye = klq%kl;
                System.out.println("购买完书本后还可以购买可乐"+kls+"个，还剩"+klye+"元");
                break;
            case 4:
                int lsq = qian-book;
                int lss = lsq/ls;
                int lsye = lsq%ls;
                System.out.println("购买完书本后还可以购买零食"+lss+"个，还剩"+lsye+"元");
                break;
            default:
                System.out.println("请输入正确的商品序列号");
                break;
        }
    }
}
